/**
 * 
 */
package com.thor.palmmall.rest.chart.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.chart.APassengersReportParam;
import com.thor.palmmall.spi.chart.SPassengersReportParam;

/**
 * @author NuoSa
 *
 * @since 1.0
 */
public class SPassengersReportParamConverter
    implements Converter<APassengersReportParam, SPassengersReportParam> {

  public static SPassengersReportParamConverter getInstance() {
    if (instance == null)
      instance = new SPassengersReportParamConverter();
    return instance;
  }

  private static SPassengersReportParamConverter instance;

  private SPassengersReportParamConverter() {
  }

  @Override
  public SPassengersReportParam convert(APassengersReportParam source) {
    if (source == null) {
      return null;
    }
    SPassengersReportParam target = new SPassengersReportParam();
    target.setDate(source.getDate());
    target.setStore(source.getStore());
    return target;
  }
}
